#define PAIR(a, b) \
  ((unsigned int)((((unsigned int)a) + ((unsigned int)b)) * (((unsigned int)a) + ((unsigned int)b) + ((unsigned int)1)) / ((unsigned int)2) + ((unsigned int)a)))
#define PAIRp(a, b)                                                         \
  ((uint64_t)(                                                              \
      (((uint64_t)a) + ((uint64_t)b)) *                                     \
          (((uint64_t)a) + ((uint64_t)b) + ((uint64_t)1)) / ((uint64_t)2) + \
      ((uint64_t)1)))
// #define PAIRp(a, b)                                                         \
//   ((uint64_t)(                                                              \
//       (((uint64_t)a) + ((uint64_t)b))))
#define TRIPLE(a, b, c) ((unsigned int)(PAIR((unsigned int)c, PAIR(a, b))))
#define TRIPLEp(a, b, c) ((unsigned int)(PAIRp((uint64_t)c, PAIRp(a, b))))
#define PAIRpo(a, b)                                                        \
  ((uint64_t)(                                                              \
      (((uint64_t)a) + ((uint64_t)b)) *                                     \
          (((uint64_t)a) + ((uint64_t)b) + ((uint64_t)1)) / ((uint64_t)2) + \
      ((uint64_t)a)))
#define TRIPLEpo(a, b, c) ((unsigned int)(PAIRpo((uint64_t)c, PAIRpo(a, b))))